package cn.sinonet.sms.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.sinonet.sms.dao.YQHKDao;
import cn.sinonet.sms.model.YQHK;

@Service("yqhkManager")
public class YQHKManagerImp extends GenericManagerImp<YQHK, Long> implements
		YQHKManager {

	YQHKDao yqhkDao;

	public YQHKDao getYqhkDao() {
		return yqhkDao;
	}

	@Autowired
	public void setYqhkDao(YQHKDao yqhkDao) {
		this.dao = yqhkDao;
		this.yqhkDao = yqhkDao;
	}

	@Override
	public YQHK saveYQHK(YQHK yqhk) {
		return dao.save(yqhk);
	}

	public YQHK loadByMessageAndPhone(String message, String phone, String time) {
		return (YQHK) yqhkDao.loadByMessageAndPhone(message, phone, time);
	}

}
